#pragma once
#include <QString>
// 330版本的 纯色着色器
struct ShaderSource_Color_V330
{
	static inline const QString sVertexShader	= u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

layout (location = 0) in vec3 qt_Vertex;

uniform highp mat4 qt_ModelViewProjectionMatrix;

void main(void)
{
	gl_Position = qt_ModelViewProjectionMatrix * vec4(qt_Vertex, 1.0);
}
)";
	static inline const QString sFragmentShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

uniform highp vec4 outColor0;

out vec4 fragColor;
void main(void)
{
	fragColor = outColor0;
}
)";
};
// 330版本的 纹理着色器
struct ShaderSource_Texture_V330
{
	static inline const QString sVertexShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

layout (location = 0) in vec3 qt_Vertex;
layout (location = 1) in vec2 qt_MultiTexCoord0;

uniform mat4 qt_ModelViewProjectionMatrix;

out vec2 qt_TexCoord0;
void main(void)
{
	gl_Position = qt_ModelViewProjectionMatrix * vec4(qt_Vertex, 1.0);
	qt_TexCoord0 = qt_MultiTexCoord0;
}
)";

	static inline const QString sFragmentShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

uniform sampler2D qt_Texture0;

in vec2 qt_TexCoord0;

out vec4 fragColor;
void main(void)
{
	fragColor = texture(qt_Texture0, qt_TexCoord0);
}
)";
};
// 330版本的 纯色着色器 实例化渲染
struct ShaderSource_ColorInstance_V330
{
	static inline const QString sVertexShader	= u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

layout (location = 0) in vec3 qt_Vertex;
layout (location = 1) in mat4 qt_InstanceMatrix;

uniform mat4 qt_ModelViewProjectionMatrix;

void main(void)
{
	gl_Position = qt_ModelViewProjectionMatrix * qt_InstanceMatrix * vec4(qt_Vertex, 1.0);
}
)";
	static inline const QString sFragmentShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

uniform highp vec4 outColor0;

out vec4 fragColor;
void main(void)
{
	fragColor = outColor0;
}
)";
};
// 330版本的 纹理着色器 实例化渲染
struct ShaderSource_TextureInstance_V330
{
	static inline const QString sVertexShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

layout (location = 0) in vec3 qt_Vertex;
layout (location = 1) in vec2 qt_MultiTexCoord0;
layout (location = 2) in mat4 qt_InstanceMatrix;
uniform mat4 qt_ModelViewProjectionMatrix;

out vec2 qt_TexCoord0;
void main(void)
{
	gl_Position = qt_ModelViewProjectionMatrix * qt_InstanceMatrix * vec4(qt_Vertex, 1.0);
	qt_TexCoord0 = qt_MultiTexCoord0;
}
)";

	static inline const QString sFragmentShader = u8R"(
#version 330

#ifdef GL_ES
// Set default precision to medium
precision highp int;
precision highp float;
#endif

uniform sampler2D qt_Texture0;

in vec2 qt_TexCoord0;

out vec4 fragColor;
void main(void)
{
	fragColor = texture(qt_Texture0, qt_TexCoord0);
}
)";
};
